package swing;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JSplitPane;
import javax.swing.JTextPane;
import javax.swing.JToolBar;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.ScrollPaneConstants;
import javax.swing.JMenu;
import javax.swing.JMenuItem;

import napkin.NapkinLookAndFeel;

import java.awt.Button;

public class base extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 * 
	 */
	public static void main(String[] args) {
		
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					
					base frame = new base();
					frame.setLocationRelativeTo(null);
					frame.setVisible(true);
					frame.setTitle("과연 첫날 밤일까요~?");
					
				} catch (Exception e) {
					e.printStackTrace();
				}//아 뭐지 -
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public base() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1024, 768);
		
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		JMenu mnNewMenu = new JMenu("관리자");
		menuBar.add(mnNewMenu);
		
		JMenuItem menuItem = new JMenuItem("관리하기");
		mnNewMenu.add(menuItem);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JToolBar toolBar = new JToolBar();
		
		contentPane.add(toolBar, BorderLayout.NORTH);
		
		final JScrollPane scrollPane = new JScrollPane();
		scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
		contentPane.add(scrollPane, BorderLayout.CENTER);
		
		
		
	
		final Giyuc load1 = new Giyuc();
		final home load2 = new home();
		
		// 툴바 이미지.
		JLabel lblNewLabel = new JLabel("이미지");
		ImageIcon hima = new ImageIcon("/image/santo_07.jpg");
		lblNewLabel.setIcon(new ImageIcon(base.class.getResource("/image/new.png")));
		toolBar.add(lblNewLabel);
		
		//기본 창 불러오기[홈]
		scrollPane.setViewportView(load2);
		
		
		JButton btnNewButton = new JButton("홈");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				scrollPane.setViewportView(null);
				scrollPane.setViewportView( new home());
			}
		});// HOME 창 불러오기
		toolBar.add(btnNewButton);
		
		
		JButton btnNewButton_1 = new JButton("지역");
		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				scrollPane.setViewportView(null);
				scrollPane.setViewportView(load1);
			}
		});// 지역창 불러오기
		toolBar.add(btnNewButton_1);
		
		JButton btnNewButton_3 = new JButton("숙박");
		toolBar.add(btnNewButton_3);
		
		JButton btnNewButton_4 = new JButton("나의 여행");
		toolBar.add(btnNewButton_4);
		
		JSeparator separator = new JSeparator();
		toolBar.add(separator);
		
		JButton btnNewButton_5 = new JButton("로그인");
		toolBar.add(btnNewButton_5);
		
		JButton button = new JButton("로그아웃");
		toolBar.add(button);
		
		
		
		
		
		
		
		
	}

}
